package com.ruoyi.system.domain.vo;

import cn.hutool.core.util.PhoneUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

public class OutsideVo {
    @Data
    public static class DetailVo{
        private Long id;

        private String city;

        private String county;

        private String cityName;

        private String countyName;
        private Byte hospitalLevel;

        private String hospitalName;

        private String departments;

        private String name;

        private String phone;

        private Byte advancedStrokeCenter;

        private Byte strokeCenter;

        private Byte mapHospital;

        private Integer strokeNumber;

        private Integer aisNumberFour;

        private Integer jmrsNumberFour;

        private Integer rtpaNumber;

        private Integer dntNumber;

        private Integer dntNumberFour;

        private Integer dntNumberSix;

        private Integer sichNumber;

        private Integer jmrsNumberOne;

        private Integer aisNumberSix;

        private Integer shouldDirectly;

        private Integer dptMedianNumber;

        private Integer prtMedianNumber;

        private Integer jmrsNumberTwo;

        private Integer deathNumber;

        private Long userId;

        private Long questionnaireId;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date createdAt;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date updatedAt;

        private Byte recStatus;
        @ApiModelProperty("是否脱敏 (0：未脱敏 1脱敏)")
        private Byte isDesensitization;
        private Byte pciStatus;

        private Byte submitStatus;

        private String province;

        private Long positionId;


        private Byte status;

        private Byte dangeStatus;

        private List<Record> recordList;

        public String getPhone(){
            if (StrUtil.isNotBlank(phone)) {
                return PhoneUtil.hideBetween(phone).toString();
            }
            return null;
        }

        @Data
        public static class Record{
            private Long detailId;
            private String code;
            private String answer;

        }

    }
}
